package com.mightybird.designpattern.creational.builder.director;

import com.mightybird.designpattern.creational.builder.product.DisplayMode;
import com.mightybird.designpattern.creational.builder.builder.DisplayModeBuilder;

public class DisplayModeDirector {
    private DisplayModeBuilder builder;

    public DisplayModeDirector(DisplayModeBuilder builder) {
        this.builder = builder;
    }

    public void setBuilder(DisplayModeBuilder builder) {
        this.builder = builder;
    }

    public DisplayMode construct() {
        builder.buildModeName();
        builder.buildMenu();
        builder.buildPlayList();
        builder.buildMainBody();
        builder.buildControlBar();
        return builder.getDisplayMode();
    }
}
